a = eval(input())
point = 0
list1 = []
for i in range(0,a):
    x = eval(input())
    list1.append(x)
amax = max(list1)
print(amax)
c = list1.count(amax)
for i in range(0,c):
    point = list1.index(amax,point) + 1
    print(point)